using System;
using System.Collections.Generic;
using OhioState.AssetManaged;

namespace OhioState.Graphics.Proxy
{
    /// <summary>
    /// Proxy for a light collection. The collection keeps instances of a number
    /// of <see>ILight</see> lights.
    /// </summary>
    [Serializable()]
    public class LightCollectionProxy : SharedAsset
    {
        public static LightCollectionProxy NoLights = new LightCollectionProxy("No Lights");

        static LightCollectionProxy()
        {
            AssetManager.Instance.Add(NoLights);
        }

        /// <summary>
        /// Creates a new light collection with a given name.
        /// </summary>
        /// <param name="name"> The name for the collection. </param>
        public LightCollectionProxy(String name)
            : base(name)
        {
        }

        /// <summary>
        /// Gets or sets the light collection.
        /// </summary>
        public IList<ILight> LightProxies
        {
            get { return lightProxies; }
            set
            {
                lightProxies = value;
                FireUpdateChangedEvent(this);
            }
        }

        private IList<ILight> lightProxies = new List<ILight>();
    }
}
